package com.sys.basics.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sys.basics.entity.vo.LogsVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import com.sys.basics.entity.SysLog;
import com.sys.basics.dao.SysLogDao;
import com.sys.basics.service.SysLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author: ares
 * @date: 2021-10-08
 * @description: 系统日志表 服务实现类
 */
@Slf4j
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogDao, SysLog> implements SysLogService {
    @Autowired
	SysLogDao sysLogDao;

    @Override
    public int clear() {
        return sysLogDao.delete(null);
    }

    @Override
    public int batchRemove(List<Long> ids) {
        return sysLogDao.deleteBatchIds(ids);
    }

    @Override
    public IPage<LogsVo> getPageList(Page<LogsVo> page,LogsVo log) {
        return sysLogDao.getPageList(page, log);
    }
}
